/************************************************************************************
	
	IBase64.h - Internal include file for Base64.dll.
	
************************************************************************************/

typedef struct tagENCODETHREADINFO
{
	HANDLE			hThread;
	BOOL			bUnicode;
	BOOL			bStarted;
	LPCBYTE			lpInput;
	UINT			cbInput;
	LPVOID			lpOutput;
	UINT			cbOutput;
	UINT			uFinished;
	BASE64CALLBACK	lpEndCallback;
	LPVOID			lpvParam;
} ENCODETHREADINFO, *LPENCODETHREADINFO;

typedef struct tagDECODETHREADINFO
{
	HANDLE			hThread;
	BOOL			bUnicode;
	BOOL			bStarted;
	LPVOID			lpInput;
	LPBYTE			lpOutput;
	UINT			cbOutput;
	UINT			uFinished;
	UINT			uTotal;
	BASE64CALLBACK	lpEndCallback;
	LPVOID			lpvParam;
} DECODETHREADINFO, *LPDECODETHREADINFO;

typedef struct tagVOIDLIST
{
	tagVOIDLIST*	lpNext;
	tagVOIDLIST*	lpPrev;
	LPVOID			lpData;
} VOIDLIST, *LPVOIDLIST;

typedef BOOL (BASE64API* BASE64ENCODEFUNC)(LPCBYTE, UINT, LPVOID, UINT);
typedef BOOL (BASE64API* BASE64DECODEFUNC)(LPVOID, LPBYTE, UINT);

BYTE			Base64Index(CHAR, BOOL);
DWORD			Encode(DWORD);
DWORD			Decode(DWORD, BOOL);
void			IBase64Encode(LPCBYTE, UINT, LPSTR);
BOOL			IBase64Decode(LPCSTR, UINT, UINT);
DWORD WINAPI	EncodeProc(LPENCODETHREADINFO);
DWORD WINAPI	DecodeProc(LPDECODETHREADINFO);